home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Network Supervisor's Toolkit
/
Network Supervisor's Toolkit.iso
/
tools
/
nwtp06
/
loglock.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1996-07-10
|
971b
|
40 lines
{$X+,B-,V-} {essential compiler directives}
program loglock;
{ Example for the nwServ unit / NwTP 0.6 API. (c) 1993,1995, R.Spronk }
{ Purpose: This program toggles the login status..
If User Login was enabled, it will be diabled and v.v. }
{ Tests the following nwServ functions:
DisableFileServerLogin
EnableFileServerLogin
GetFileServerLoginStatus
}
uses nwMisc,nwServ;
Var allowed:boolean;
begin
IF GetFileServerLoginStatus(allowed)
then begin
if allowed
then begin
DisableFileServerLogin;
writeln('Login Disabled.')
end
else begin
EnableFileserverLogin;
writeln('Login Enabled.')
end
end
else begin
if nwServ.result=$C6
then writeln('You need console operator rights to run this utility.')
else writeln('GetFileserverLoginStatus Error : $',HexStr(nwServ.result,2));
end;
end.